﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;

namespace br.com.clavis.infrastructure.command
{
    interface ICommandExecute<TEntity> where TEntity : class
    {
        T Execute<T>();
    }

    interface ISelect<TEntity> where TEntity : class
    {
        List<TEntity> Select();
        List<TEntity> Select(TEntity Entity);
        List<TEntity> Select(TEntity Entity, params Expression<Func<TEntity>>[] predicate);
    }

    interface IDelete<TEntity> where TEntity : class
    {
        int Delete(TEntity Entity);
        int Delete(TEntity Entity, params Expression<Func<TEntity>>[] predicate);
    }

    interface IInsert<TEntity> where TEntity : class
    {
        int Insert(TEntity Entity);
        int Insert(TEntity Entity, params Expression<Func<TEntity>>[] predicate);
    }

    interface IUpdate<TEntity> where TEntity : class
    {
        int Update(TEntity Entity);
        int Update(TEntity Entity, params Expression<Func<TEntity>>[] predicate);
    }
}
